package com.crazy.crazytransactionservice.controller.inner;

import com.crazy.crazytransactionservice.service.RedeemService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/inner/redeem")
@Slf4j
public class RedeemInnerController {
    @Autowired
    private RedeemService redeemService;

    /**
     * 根据id 确认赎回订单
     * @param transactionId
     */
    @PostMapping("/confirm")
    public void confirmRedeem(@RequestParam("transactionId")int transactionId) {
        redeemService.confirmRedeem(transactionId);
    }
}
